package com.uah;

import java.util.List;

import com.scraper.Link;

import android.os.Parcel;
import android.os.Parcelable;

//This class is currently not used
//First attempt at Singleton for all webscraper data
public class CurrentStudentsSharedData implements Parcelable {
	private List<Link> courseListingsLinks;
	private List<List<Link>> collegeListingsLinks;
	private List<List<String>> collegeData;
	
	//Setters and getters
	public List<Link> getCourseListingsLinks(){
		return courseListingsLinks;
	}
	
	public void setCourseListingsLinks(List<Link> links){
		this.courseListingsLinks = links;
	}
	
	public List<List<Link>> getCollegeListingsLinks(){
		return collegeListingsLinks;
	}
	
	public void setCollegeListingsLinks( List<List<Link>> links){
		this.collegeListingsLinks = links;
	}
	
	public List<List<String>> getCollegeData(){
		return collegeData;
	}
	
	public void setCollegeData(List<List<String>> data){
		this.collegeData = data;
	}
	
	public  CurrentStudentsSharedData(List<Link> courses, List<List<Link>> colleges, List<List<String>> data){
		this.courseListingsLinks = courses;
		this.collegeListingsLinks = colleges;
		this.collegeData = data;
	}
	
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int arg1) {
		dest.writeList(courseListingsLinks);
		dest.writeList(collegeListingsLinks);
		dest.writeList(collegeData);
	}
	
    public static final Parcelable.Creator<CurrentStudentsSharedData> CREATOR
    = new Parcelable.Creator<CurrentStudentsSharedData>() {
    	public CurrentStudentsSharedData createFromParcel(Parcel in) {
    		return new CurrentStudentsSharedData(in);
    	}

    	public CurrentStudentsSharedData[] newArray(int size) {
    		return new CurrentStudentsSharedData[size];
    	}
    };

    private CurrentStudentsSharedData(Parcel in) {
    	in.readList(courseListingsLinks, null);
    	in.readList(collegeListingsLinks, null);
    	in.readList(collegeData, null);
    }

}
